package com.sc.show.hytrix;

import com.sc.show.entity.Weather;
import com.sc.show.entity.WeatherResponse;
import com.sc.show.feign.WeatherDataFeign;
import org.springframework.stereotype.Component;

/**
 * @author shuchang
 * @Date 2018/3/20 上午9:05
 */
@Component
public class WeatherDataFallBack implements WeatherDataFeign{

    @Override
    public WeatherResponse getById(String cityId) {
        WeatherResponse weatherResponse = new WeatherResponse();
        weatherResponse.setData(new Weather());
        return weatherResponse;
    }

    @Override
    public WeatherResponse getByName(String cityName) {
        WeatherResponse weatherResponse = new WeatherResponse();
        weatherResponse.setData(new Weather());
        return weatherResponse;
    }
}
